import 'package:flutter/material.dart';
import 'package:flutter_app02/components/MyDialog.dart';

class Info extends StatefulWidget {
  const Info({Key? key}) : super(key: key);

  @override
  _InfoState createState() => _InfoState();
}

class _InfoState extends State<Info> {
  @override
  Widget build(BuildContext context) {
    return Wrap(
      spacing: 22,
      children: [
        ElevatedButton(
          child: Text('搜索'),
          onPressed: (){
            Navigator.pushNamed(context, '/search');
          }
        ),
        ElevatedButton(
            child: Text('按钮组件'),
            onPressed: (){
              Navigator.pushNamed(context, '/button');
            }
        ),
        ElevatedButton(
          child: Text('文本框'),
          onPressed: (){
            Navigator.pushNamed(context, '/field');
          },
        ),
        ElevatedButton(
          child: Text('checkbox'),
          onPressed: (){
            Navigator.pushNamed(context, '/checkbox');
          },
        ),
        ElevatedButton(
          child: Text('Radio'),
          onPressed: (){
            Navigator.pushNamed(context, '/radio');
          },
        ),
        ElevatedButton(
          child: Text('学员登记系统'),
          onPressed: (){
            Navigator.pushNamed(context, '/student');
          },
        ),
        ElevatedButton(
          child: Text('日期一'),
          onPressed: (){
            Navigator.pushNamed(context, '/date');
          },
        ),
        ElevatedButton(
          child: Text('日期二'),
          onPressed: (){
            Navigator.pushNamed(context, '/datetimepicker');
          },
        ),
        ElevatedButton(
          child: Text('轮播1'),
          onPressed: (){
            Navigator.pushNamed(context, '/swiper1');
          },
        ),
        ElevatedButton(
          child: Text('对话框Dialog...'),
          onPressed: (){
            Navigator.pushNamed(context, '/dialog1');
          },
        ),
        ElevatedButton(
          child: Text('MyDialog1'),
          onPressed: (){
            showDialog(
              context: context,
              builder: (context){
                return MyDialog('关于我们','这是关于企业的信息'*9);
              }
            );
          },
        ),
        ElevatedButton(
          child: Text('data'),
          onPressed: (){
            Navigator.pushNamed(context, '/data1');
          },
        ),

      ],
    );
  }
}
